package com.viphome.service;

import com.viphome.domain.Product;
import com.viphome.security.AdminOnly;
import com.viphome.security.AuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by wangzhanjin on 2017/12/22.
 */
@Service
public class ProductService {
    @Autowired
    AuthService authService;


//    @AdminOnly
    public void insert(Product product){
        //校验权限
//        authService.checkAccess();
        System.out.println("insert product");
    }

//    @AdminOnly
    public void delete(Long id){
        //在原有代码的基础上插入一段，校验代码
//        authService.checkAccess();
        System.out.println("delete product");
//        System.out.println("打印了日志，delete方法执行完了。。。。。。。。。。。。。。");
    }
}
